﻿#ifndef DEFINE_CONFIG_H
#define DEFINE_CONFIG_H


typedef int 			int32;
typedef unsigned int 	uint32;
typedef unsigned short 	uint16;
typedef unsigned char 	uint8;

#ifndef BOOL_DEF
typedef int				    BOOL;
#define BOOL_DEF
#endif

typedef unsigned int	    UINT;
typedef int				    SOCKET;
typedef uint8 *			    LPBYTE;

typedef long long           int64;
typedef unsigned long long  uint64;


#define TRUE			    1
#define	FALSE			    0




// 读取文件转换流
#define GB_FILE   1

//直播流
//#define GB_LIVE   0




//制造商
#define  GB28181_MANUFACTURER   "dcw"

//设备名字  Happytimesoft
#define GB28181_DEVICE_NAME  "DSJ_V8"

//模式 IPC
#define GB28181_MODEL "IPC"

//SIP信令中的信息
//#define GB28181_SIP_USER_AGENT "Body Worn Camera"
#define GB28181_SIP_USER_AGENT "GoSunCN"

#define GB28181_SIP_SERVER_VER  GB28181_SIP_USER_AGENT




////制造商
//#define  GB28181_MANUFACTURER   "Hikvision"
//
////设备名字  Happytimesoft
//#define GB28181_DEVICE_NAME  "Camera 01"
//
////模式 IPC
//#define GB28181_MODEL "IP Camera"
//
////SIP信令中的信息
//#define GB28181_SIP_USER_AGENT "IP Camera"
//#define GB28181_SIP_SERVER_VER  GB28181_SIP_USER_AGENT




#define TEST_FILE_NAME "test.mp4"

#define LOG_FILE_NAME  "sdcard/log.txt"//20210921

#define  LIVE_AUDIO_TYPE     1//20220122 dcw定义实时中的音频格式0-PCMA 1-G711A
#define  LIVE_VIDEO_TYPE     1//20220322 国网B接口 1-100 H264 0:98 H264
#define  GDW_B 0//20220322 国网B接口

#define  VIDEO_H264      1
#define  VIDEO_H265      2
#define  AUDIO_PCM       3
#define  AUDIO_G711A     4
#define  AUDIO_G711U     5

typedef  struct
{
    int videoType;
    int audioType;
}tVideoaudio;

typedef  struct
{
    tVideoaudio live;
    tVideoaudio talk;
    tVideoaudio playback;
}tVideoaudioformat;


// 設置传输过程的音视频格式
extern tVideoaudioformat  g_videoaudioformat;

//大华平台  platform
#define  DA_HUA_PLATFORM   1



#if 0
    #include <android/log.h>

    #define  LOG_TAG    "GB28181"
    #define  DbugLog(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
    #define  InfoLog(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
    #define  WarnLog(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
    #define  ErrorLog(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
    #define  FatalLog(...) __android_log_print(ANDROID_LOG_FATAL,LOG_TAG,__VA_ARGS__)

#else

    #define  DbugLog(...)
    #define  InfoLog(...)
    #define  WarnLog(...)
    #define  ErrorLog(...)
    #define  FatalLog(...)

#endif

#include <time.h>

typedef int (*stateCallBackFun)(int sysState,int connState,int heartbeatExceptionCount, int liveState, int talkState, int videotapeState,int videotapedownloadState);

typedef  int (*talkCallBackFun)(uint8 * p_data, int len, uint32 ts, uint16 seq);

typedef  int (*broadcastCallBackFun)(uint8 * p_data, int len, uint32 ts, uint16 seq);


typedef  char* (*TYPEDEF_recordLIstQueryCallBackFun) (  int  StartTime ,int  EndTime ,char * Type);


typedef  int (*TYPEDEF_playbackQueryFileNameCallBackFun) (time_t StartTime ,time_t  EndTime ,char *outDirFile);
typedef  int (*TYPEDEF_downloadQueryFileNameCallBackFun) (time_t StartTime ,time_t  EndTime ,char *outDirFile);


#endif



